package com.dayuanit.mars.auto;

import com.dayuanit.mars.map.Point;

public class Engine {

	public void run(Point point, String order) {
		if ("w".equals(order)) {
			ForwardEngine engine = new ForwardEngine();
			engine.move(point);
		}

		if ("s".equals(order)) {
			BackEngine engine = new BackEngine();
			engine.move(point);
		}

		if ("a".equals(order)) {
			LeftEngine engine = new LeftEngine();
			engine.move(point);
		}

		if ("d".equals(order)) {
			RightEngine engine = new RightEngine();
			engine.move(point);
		}
	}
}